<?php
class CPagination_details
{
        var $offset = '';
        var $limit = '';
        var $total_rows = 0;
        var $uri_segment = 3;
        var $num_links = 5;
        var $per_page = 5;
        var $base_url = '';
        var $query_string_segment = 'per_page';
        var $page_query_string = TRUE;
        
        function  CPagination_details()
        {
                $this->offset = 0;
                $this->limit = 10;
                $this->base_url = base_url();
                $this->total_rows = 0;
                $this->uri_segment = 3;
                $this->num_links = 1;
                $this->per_page = 10;
                $this->query_string_segment = 'page';
                $this->page_query_string = TRUE;
                $this->page_previous = 'Previous';
                $this->page_next = 'Next';
                $this->page_first = 'First';
                $this->page_last = 'Last';
                $this->page_display_pages = FALSE;
        }

        function config_pagination_initialize($rows, $base_url)
        {       
            $config['total_rows'] = $rows; 
            $config['uri_segment'] = $this->uri_segment;
            $config['num_links'] = $this->num_links;
            $config['per_page'] = $this->per_page;
            $config['base_url'] = $base_url;
            $config['query_string_segment'] = $this->query_string_segment;
            $config['page_query_string'] = $this->page_query_string;
            $config['next_link'] = $this->page_next;
            $config['prev_link'] = $this->page_previous;
            $config['first_link'] = $this->page_first;
            $config['last_link'] = $this->page_last;
            return $config;
        }
}
?>